Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 4, 2025

The version schema regex patterns only accepted lowercase letters [a-z] in pre-release identifiers, rejecting valid SemVer identifiers like RC, BETA, or Alpha. SemVer spec requires support for [0-9A-Za-z-].

Changes

  • Updated regex patterns in version.schema.json to accept [a-zA-Z]:
    • version property pattern (line 34)
    • versionHeightOffsetAppliesTo property pattern (line 74)
    • gitCommitIdPrefix property pattern (line 97)
  • Added test coverage for uppercase pre-release identifiers

Example

{
  "version": "2.3-RC1"      // now valid
}
{
  "version": "1.0-BETA"     // now valid
}
{
  "version": "2.0-Alpha.1"  // now valid
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 3dovsblobprodeus2188.blob.core.windows.net
    • Triggering command: dotnet restore --no-dependencies /home/REDACTED/work/Nerdbank.GitVersioning/.codeql-scratch/dbs/csharp/working/32A0A2D38A721DD2A3E59F6279CF8961/missingpackages_workingdir --packages /home/REDACTED/work/Nerdbank.GitVersioning/.codeql-scratch/dbs/csharp/working/missingpackages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal --configfile /home/REDACTED/work/Nerdbank.GitVersioning/.codeql-scratch/dbs/csharp/working/nugetconfig/nuget.config --force (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Version schema only allows lower case pre-release versions</issue_title>
<issue_description>Current version pattern in the version.schema.json allows only lower case pre-release version [\da-z\-] while the semver specification allows any case:

Identifiers MUST comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-]</issue_description>

<agent_instructions>Expand the version schema to allow upper-case letters.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@AArnott I'd take a PR that fixes this. But as the current bug protects you from .NET SDK bugs, I agree with @KalleOlaviNiemitalo and am in no personal rush to fix this. @AArnott It looks like it is.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update version schema to allow upper case pre-release versions Allow uppercase letters in pre-release version identifiers Nov 4, 2025
Copilot AI requested a review from AArnott November 4, 2025 14:46
Copilot finished work on behalf of AArnott November 4, 2025 14:46
@AArnott AArnott marked this pull request as ready for review November 4, 2025 17:04
@AArnott AArnott enabled auto-merge November 4, 2025 17:04
@AArnott AArnott added this pull request to the merge queue Nov 4, 2025
Merged via the queue into main with commit de09f32 Nov 4, 2025
18 of 19 checks passed
@AArnott AArnott deleted the copilot/update-version-schema-regex branch November 4, 2025 17:57
This was referenced Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version schema only allows lower case pre-release versions

2 participants